import Cookies from 'js-cookie'
// localStorage
// 设置: localStorage.setItem(name,value)
// 获取:localStorage.getItem(name)
// 移除: localStorage.removeItem(name)
// 原生: Cookie 麻烦 => js-cookie
// 优势: 安全(推荐) / 硬伤: 移动端禁用
// 设置: Cookies.set(name, value)
// 获取: Cookies.get(name)
// 移除: Cookies.remove(name)

const TokenKey = 'cui-hr-dis-xm-token'

export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}
